<template>
  <dv-scroll-board :config="config" style="width: 100%; height: 100%; margin-left: 0.5rem" />
</template>
<script>
import dprevent from '@/api/dprevent'

export default {
  data() {
    return {
      config: {
        data: [],
        oddRowBGC: 'transparent',
        evenRowBGC: 'transparent',
        index: true,
        columnWidth: [40],
        align: ['center']
      }
    }
  },
  mounted() {
    this.getApiData()
    setInterval(() => {
      this.getApiData()
    }, 5000)
  },
  methods: {
    getApiData() {
      dprevent.dprightapi1().then((res) => {
        if (res.code === 'success') {
          if (res.result) {
            this.config.data = res.result
          }
        }
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.dv-scroll-board :deep(.row-item) {
  font-size: 12px;
}
</style>

